package com.create404.suishoupai.controller;


import com.create404.suishoupai.service.INewsService;
import com.create404.suishoupai.utils.Result;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author create404
 * @since 2021-07-17
 */
@Api(tags = "新闻接口")
@RestController
@RequestMapping("/news")
public class NewsController {
    @Autowired
    private INewsService iNewsService;

    @GetMapping("/companyNewsList")
    public Result getCompanyNewsList() {
        return Result.ok(iNewsService.getNewsList("公司"));
    }

    @GetMapping("/industryNewsList")
    public Result getIndustryNewsList() {
        return Result.ok(iNewsService.getNewsList("行业"));
    }


}
